home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / lib / partman / fstab.d / xfs < prev   
Text File  |  2007-12-28  |  842b  |  36 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. for dev in $DEVICES/*; do
  6.     [ -d $dev ] || continue
  7.     cd $dev
  8.     open_dialog PARTITIONS
  9.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  10.         [ $fs != free ] || continue
  11.         [ -f "$id/method" ] || continue
  12.         [ -f "$id/acting_filesystem" ] || continue
  13.         method=$(cat $id/method)
  14.         filesystem=$(cat $id/acting_filesystem)
  15.         case "$filesystem" in
  16.             xfs)
  17.             [ -f "$id/mountpoint" ] || continue
  18.             mountpoint=$(cat $id/mountpoint)
  19.             # due to #249322, #255135, #258117:
  20.             if [ "$mountpoint" = /tmp ]; then
  21.                 rm -f $id/options/noexec
  22.             fi
  23.             options=$(get_mountoptions $dev $id)
  24.             if [ "$mountpoint" = / ]; then
  25.                 # remount-ro does not work for XFS, do not add it
  26.                 pass=1
  27.             else
  28.                 pass=2
  29.             fi
  30.             echo "$path" "$mountpoint" xfs $options 0 $pass
  31.             ;;
  32.         esac
  33.     done
  34.     close_dialog
  35. done
  36.